<template>
  <div class="log-info">
    <div v-for="(item,index) in datas" :key="item.id" class="log-item">
      <div class="circle flex-center">
        <div class="circle2"></div>
      </div>
      <div class="info">
        <div class="title">{{ ["", "操作", "告警", "推送", "登录"][item.type] }}日志</div>
        <div class="other">
          <div class="L1">
            <div class="content">
              <div class="name">日志ID：</div>
              <div class="data">{{ item.id }}</div>
            </div>
            <div v-if="item.type===2 && ['', '天台逗留', ['','晚归告警','未归告警',''][item.is_wg], '上网行为', '失联', ['','异常外出',''][item.is_yc]][item.gj_lx]"
                 class="tag"
            >
              {{
                ["", "天台逗留", ["", "晚归告警", "未归告警", ""][item.is_wg], "上网行为", "失联", ["", "异常外出", ""][item.is_yc]][item.gj_lx]
              }}
            </div>
          </div>
          <div class="L1">
            <div class="content">
              <div class="name">操作事项：</div>
              <div class="data">{{ item.name }}</div>
            </div>
          </div>
          <div class="L1">
            <div class="content">
              <div class="name">操作时间：</div>
              <div class="data">{{ item.sj }}</div>
            </div>
            <div class="content">
              <div class="name">操作者：</div>
              <div class="data">管理员</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="log-line"/>
  </div>
</template>

<script setup>
defineProps({
  datas: {
    type: Array,
    default: []
  }
});
</script>

<style lang="less" scoped>
@import "./index.less";
</style>
